home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Online / hsc / source / hscprj / project.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-02  |  2.3 KB  |  73 lines

  1. /*
  2.  * This source code is part of hsc, a html-preprocessor,
  3.  * Copyright (C) 1995-1997  Thomas Aglassinger
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  *
  19.  */
  20. /*
  21.  * hscprj/project.h
  22.  *
  23.  * project managment routines for hsc
  24.  *
  25.  */
  26.  
  27. #ifndef HSCPRJ_PROJECT_H
  28. #define HSCPRJ_PROJECT_H
  29.  
  30. /*
  31.  * project-structure
  32.  */
  33. typedef struct hscproject
  34. {
  35.     HSCDOC *document;           /* current document */
  36.     DLLIST *documents;          /* other documents */
  37.     INFILE *inpf;
  38.     BOOL debug;
  39.     BOOL fatal;
  40.     APTR user_data;             /* user data; hsclib assigns the current
  41.                                  * hsc-process to it */
  42.  
  43.     /* callbacks */
  44.       VOID(*CB_msg_unknown_id) (struct hscproject * hp,
  45.                                 STRPTR document, STRPTR id);
  46.       VOID(*CB_msg_corrupt_pf) (struct hscproject * hp, STRPTR reason);
  47. }
  48. HSCPRJ;
  49.  
  50. /* return-codes for check_document_id */
  51. #define ERR_CDI_OK              0
  52. #define ERR_CDI_NoID            1
  53. #define ERR_CDI_NoDocumentEntry 2
  54.  
  55. extern int check_document_id(HSCPRJ * hp, STRPTR docname, STRPTR id);
  56.  
  57. extern HSCPRJ *new_project( VOID );
  58. extern VOID del_project(HSCPRJ *hp);
  59.  
  60. extern BOOL hsc_project_read_data(HSCPRJ * hp, INFILE * inpf);
  61. extern BOOL hsc_project_write_data(HSCPRJ * hp, STRPTR project_fname, BOOL force);
  62.  
  63. extern BOOL hsc_project_add_document(HSCPRJ *hp);
  64. extern BOOL hsc_project_del_document(HSCPRJ * hp, STRPTR docname);
  65.  
  66. extern BOOL hsc_project_set_filename( HSCPRJ *hp, STRPTR new_prjname);
  67. extern BOOL hsc_project_set_document( HSCPRJ *hp, STRPTR new_docname);
  68. extern BOOL hsc_project_set_source( HSCPRJ *hp, STRPTR new_sourcename);
  69. extern BOOL hsc_project_add_include( HSCPRJ *hp, STRPTR new_includename);
  70.  
  71. #endif /* HSCPRJ_PROJECT_H */
  72.  
  73.